package org.pentaho.actioneditor.client.processpanels;

import com.google.gwt.user.client.ui.*;
import org.pentaho.actioneditor.client.messages.Messages;
import com.google.gwt.user.client.Command;


public class TableEditorUI {

  private VerticalPanel root = new VerticalPanel();
  private Label editorLabel = new Label(Messages.getUIInstance().tableeditorui_TableEditor());
  private MenuItem up = new MenuItem(Messages.getUIInstance().tableeditorui__0000(), (Command)null);
  private MenuItem down = new MenuItem(Messages.getUIInstance().tableeditorui__0001(), (Command)null);
  private MenuBar addList = new MenuBar(true);
  private MenuItem delete = new MenuItem(Messages.getUIInstance().tableeditorui_X(), (Command)null);
  private FlexTable table = new FlexTable();


  public void init() {
    HorizontalPanel obj108 = new HorizontalPanel();
    obj108.add(editorLabel);
    MenuBar obj109 = new MenuBar();
    obj109.addItem(up);
    obj109.addItem(down);
    MenuItem obj110 = new MenuItem(Messages.getUIInstance().tableeditorui__0002(), (Command)null);
    obj109.addItem(obj110);
    MenuItem obj111 = new MenuItem(Messages.getUIInstance().tableeditorui_Add(), (Command)null);
    obj111.setSubMenu(addList);
    obj109.addItem(obj111);
    obj109.addItem(delete);
    obj108.add(obj109);
    obj108.setWidth("100%");
    root.add(obj108);
    ScrollPanel obj112 = new ScrollPanel();
    obj112.add(table);
    obj112.setWidth("100%");
    obj112.setHeight("100px");
    obj112.setAlwaysShowScrollBars(true);
    root.add(obj112);

  }

  public VerticalPanel getRoot() {
    return root;
  }
  public Label getEditorLabel() {
    return editorLabel;
  }
  public MenuItem getUp() {
    return up;
  }
  public MenuItem getDown() {
    return down;
  }
  public MenuBar getAddList() {
    return addList;
  }
  public MenuItem getDelete() {
    return delete;
  }
  public FlexTable getTable() {
    return table;
  }

}
